

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>霸业技术文档中心 &mdash; 霸业技术文档中心 1.0 文档</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="霸业技术文档中心 1.0 文档" href="#"/>
        <link rel="next" title="脚本系统简易教程" href="script/index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        

        
          <a href="#" class="icon icon-home"> 霸业技术文档中心
        

        
        </a>

        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

        
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
          
          
              <ul>
<li class="toctree-l1"><a class="reference internal" href="script/index.html">脚本系统简易教程</a><ul>
<li class="toctree-l2"><a class="reference internal" href="script/index.html#javascript">Javascript简要基础</a><ul>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id2">基本概念</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id3">注释</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id4">Javascript的数据类型</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id5">赋值</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id6">条件判断</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id7">遍历数据</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#function">函数（function）</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="script/index.html#id8">霸业脚本系统原理</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/index.html#id9">霸业脚本编写向导</a></li>
<li class="toctree-l2"><a class="reference internal" href="script/index.html#id10">调试方法</a><ul>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id11">实时查看和修改引擎数据</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id12">实时替换钩子函数</a></li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id13">添加调试日志</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="script/index.html#api">霸业API手册</a><ul>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#datas">数据手册</a><ul>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-data">baye.data 属性</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#hooks">钩子函数手册</a><ul>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-aifightcommand">baye.hooks.aiFightCommand</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getskillids">baye.hooks.getSkillIds</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-calcattackrange">baye.hooks.calcAttackRange</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-showskill">baye.hooks.showSkill</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-givetool">baye.hooks.giveTool</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-takeofftool">baye.hooks.takeOffTool</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didopennewgame">baye.hooks.didOpenNewGame</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didloadgame">baye.hooks.didLoadGame</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willsavegame">baye.hooks.willSaveGame</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-tacticstage1">baye.hooks.tacticStage1</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-tacticstage2">baye.hooks.tacticStage2</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-tacticstage3">baye.hooks.tacticStage3</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-tacticstage4">baye.hooks.tacticStage4</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-tacticstage5">baye.hooks.tacticStage5</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willaddorder">baye.hooks.willAddOrder</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willexecuteorder">baye.hooks.willExecuteOrder</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-enterbattle">baye.hooks.enterBattle</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlestage1">baye.hooks.battleStage1</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlestage2">baye.hooks.battleStage2</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlestage3">baye.hooks.battleStage3</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlestage4">baye.hooks.battleStage4</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlestage5">baye.hooks.battleStage5</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-exitbattle">baye.hooks.exitBattle</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-citymakecommand">baye.hooks.cityMakeCommand</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willgivetool">baye.hooks.willGiveTool</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willtakeofftool">baye.hooks.willTakeOffTool</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-countattackhurt">baye.hooks.countAttackHurt</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-countskillhurt">baye.hooks.countSkillHurt</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battlebuildattackattriutes">baye.hooks.battleBuildAttackAttriutes</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#id16">baye.hooks.getSkillIds</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-battledrivepersonstate">baye.hooks.battleDrivePersonState</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getmaxarms">baye.hooks.getMaxArms</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-gettoolpropertyvalue">baye.hooks.getToolPropertyValue</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-gettoolpropertytitle">baye.hooks.getToolPropertyTitle</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getpersonpropertyvalue">baye.hooks.getPersonPropertyValue</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getpersonpropertytitle">baye.hooks.getPersonPropertyTitle</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getcitypropertydisplay">baye.hooks.getCityPropertyDisplay</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getfighterinfo">baye.hooks.getFighterInfo</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getterraininfo">baye.hooks.getTerrainInfo</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-showabout">baye.hooks.showAbout</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willshowpkanimation">baye.hooks.willShowPKAnimation</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didshowpkanimation">baye.hooks.didShowPKAnimation</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-showminimap">baye.hooks.showMiniMap</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-showmainhelp">baye.hooks.showMainHelp</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didshowfightstatebar">baye.hooks.didShowFightStateBar</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didrefreshfightstatebar">baye.hooks.didRefreshFightStateBar</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didshowfightsituation">baye.hooks.didShowFightSituation</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-didrefreshfightsituation">baye.hooks.didRefreshFightSituation</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-loadfightmap">baye.hooks.loadFightMap</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-getpersonname">baye.hooks.getPersonName</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-showstatechanged">baye.hooks.showStateChanged</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-drawgenerals">baye.hooks.drawGenerals</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-countmove">baye.hooks.countMove</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-countlandresistance">baye.hooks.countLandResistance</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-countmoverange">baye.hooks.countMoveRange</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-fontimageforchar">baye.hooks.fontImageForChar</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willopenmenu">baye.hooks.willOpenMenu</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willchangemenuselection">baye.hooks.willChangeMenuSelection</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willclosemenu">baye.hooks.willCloseMenu</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-fightcountwinner">baye.hooks.fightCountWinner</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-willshowcityinfo">baye.hooks.willShowCityInfo</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-hooks-fightwillshowhelp">baye.hooks.fightWillShowHelp</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="script/index.html#id17">功能函数</a><ul>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getpersonname-index">baye.getPersonName(index)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-gettoolname-index">baye.getToolName(index)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getskillname-index">baye.getSkillName(index)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getcityname-index">baye.getCityName(index)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-setcustomdata-data">baye.setCustomData(data)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getcustomdata">baye.getCustomData()</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-alert-msg-then">baye.alert(msg, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-say-personindex-msg-then">baye.say(personIndex, msg, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-delay-ticks-flag-then">baye.delay(ticks, flag, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-playspe-x-y-speid-index-flag-then">baye.playSPE(x, y, speid, index, flag, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-choose-x-y-w-h-items-init-then">baye.choose(x, y, w, h, items, init, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-centerchoose-w-h-items-init-then">baye.centerChoose(w, h, items, init, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-chooseperson-items-init-then">baye.choosePerson(items, init, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-choosetool-items-init-then">baye.chooseTool(items, init, then)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getpersonbyname-name">baye.getPersonByName(name)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getcitybyname-name">baye.getCityByName(name)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getfighterindexbyname-name">baye.getFighterIndexByName(name)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getfighterpositionbyname-name">baye.getFighterPositionByName(name)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getpersonnamebyid-id">baye.getPersonNameByID(id)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getterrainbygeneralindex-index">baye.getTerrainByGeneralIndex(index)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-putpersonincity-city-person">baye.putPersonInCity(city, person)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-puttoolincity-city-tool-hide">baye.putToolInCity(city, tool, hide)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-deletepersonincity-city-person">baye.deletePersonInCity(city, person)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-deletetoolincity-city-tool">baye.deleteToolInCity(city, tool)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getpersonbygeneralindex-gindex">baye.getPersonByGeneralIndex(gIndex)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-movehere-name">baye.moveHere(name)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-drawtext-x-y-text">baye.drawText(x, y, text)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-drawimage-x-y-resid-resitem-picindex">baye.drawImage(x, y, resid, resitem, picIndex)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-clearrect-left-top-right-bottom">baye.clearRect(left, top, right, bottom)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-revertrect-left-top-right-bottom">baye.revertRect(left, top, right, bottom)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-drawline-startx-starty-endx-endy">baye.drawLine(startX, startY, endX, endY)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-drawrect-left-top-right-bottom">baye.drawRect(left, top, right, bottom)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-drawdot-x-y-color">baye.drawDot(x, y, color)</a></li>
<li class="toctree-l4"><a class="reference internal" href="script/index.html#baye-getnumber-min-max-then">baye.getNumber(min, max, then)</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="demos/index.html">示范脚本</a><ul>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id2">计算攻防</a></li>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id3">计算伤害</a></li>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id4">道具为人物加额外属性</a></li>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id5">不复用年龄数据，额外为人物增加统率属性</a></li>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id6">弹出提示，和对话</a></li>
<li class="toctree-l2"><a class="reference internal" href="demos/index.html#id7">&#8220;工匠&#8221;人物</a></li>
</ul>
</li>
</ul>

          
        
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="#">霸业技术文档中心</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="#">Docs</a> &raquo;</li>
      
    <li>霸业技术文档中心</li>
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="_sources/index.txt" rel="nofollow"> View page source</a>
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document">
            
  <div class="section" id="id1">
<h1>霸业技术文档中心<a class="headerlink" href="#id1" title="永久链接至标题">¶</a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="script/index.html">脚本系统简易教程</a></li>
<li class="toctree-l1"><a class="reference internal" href="demos/index.html">示范脚本</a></li>
</ul>
</div>
</div>


          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="script/index.html" class="btn btn-neutral float-right" title="脚本系统简易教程" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; 版权所有 2017, loong.
    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>
      <script type="text/javascript" src="_static/translations.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>